package com.eliteams.quick4j.web.controller;
import com.eliteams.quick4j.web.service.BaiduSearchService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * Created by Administrator on 2016/4/17.
 */
@Controller
@RequestMapping("/search")
public class BaiduController {
    @Autowired
    BaiduSearchService service;
    @RequestMapping("baidu")
    @ResponseBody
    public String baidu(HttpServletRequest request, HttpServletResponse response, ModelMap modelMap){
        return service.search("长城");
    }
    @RequestMapping("result")
    public String result(HttpServletRequest request, HttpServletResponse response, ModelMap modelMap){
        return "result";
    }
}
